﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace ProjectNocturnalFool
{
    class CharacterDisplayPanel : PanelControl
    {
        public Character displayCharacter;
        public LabelControl lblTitle, lblGender;
            //lblName, lblPortrait, lblImage, , lblRace, lblClass, lblAlignment, lblHp, lblArmor, lblAP, lblInit;

        public override void LoadContent()
        {
            base.LoadContent();

            height = 100;
            width = 100;

            lblTitle = new LabelControl();
            lblTitle.LoadContent();
            lblTitle.message = "Adventurer Information";
            lblTitle.x = x;
            lblTitle.y = y;
            lblTitle.width = width;
            lblTitle.xAnchor = HorizontalAnchor.Left;
            lblTitle.yAnchor = VerticleAnchor.Top;
            lblTitle.drawBorder = true;
            lblTitle.expandWidth = true;
            lblTitle.borderColor = Color.Gray;
            
            controls.Add(lblTitle);

            lblGender = new LabelControl();
            lblGender.LoadContent();            
            lblGender.x = x + Constants.ControlOffsets;
            lblGender.y = (lblTitle.y + lblTitle.height) + Constants.ControlOffsets;
            lblGender.xAnchor = HorizontalAnchor.Left;
            lblGender.yAnchor = VerticleAnchor.Top;
            controls.Add(lblGender);
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
            if (displayCharacter != null)
            {
                lblGender.message = "Gender: " + displayCharacter.gender;
            }
        }

        public override void Draw(GameTime gameTime)
        {
            if (displayCharacter != null)
                base.Draw(gameTime);
            else
                lblTitle.Draw(gameTime); 


        }

        

    }
}
